Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBVM-89: Show info about signing up on first fetch #246

Merged
merged 1 commit into from
Apr 24, 2023
Merged

Conversation

yvanzo
Copy link
Contributor

@yvanzo yvanzo commented Apr 21, 2023

Problem MBVM-89

There is a lack of information about the sign-up process when downloading data without using the live data feed (which already requires signing up in practice to get a replication token).

Solution

It shows information about signing up when fetching data (database and/or search indexes) dumps, for commercial or non-commercial use.

It doesn’t show it for fetching sample dump which is for development.

It doesn’t show it again for further downloads if answered already. To do that, it creates an empty file in the database dump directory. If we need to update any of these messages in the future, we can compare the timestamp of this file to show the updated message.

Progress

Copy link
Member

@reosarevok reosarevok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general idea seems good, added a couple comments only. Should we add some "go sign up" info to the README as well?

build/musicbrainz-dev/scripts/fetch-dump.sh Show resolved Hide resolved
build/musicbrainz-dev/scripts/fetch-dump.sh Show resolved Hide resolved
It shows information about signing up when fetching data (database
and/or search indexes) dumps, for commercial or non-commercial use.

It doesn’t show it for fetching sample dump which is for development.

It doesn’t show it again for further downloads if answered already.
To do that, it creates an empty file in the database dump directory.
If we need to update any of these messages in the future,
we can compare the timestamp of this file to show the updated message.
@yvanzo yvanzo force-pushed the mbvm-89-info-dl branch 2 times, most recently from ed5987f to 243f95f Compare April 24, 2023 16:15
@yvanzo yvanzo marked this pull request as ready for review April 24, 2023 16:15
Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks! It would be great if we could have a single instance of the text, but if that is not possible (or a giant pain) then go ahead and just merge. Thanks!

if [[ ${REPLY:0:1} =~ [Yy] ]]
then
prompt=$(cat <<-EOQ
The MetaBrainz Foundation is supported by commercial users of our data and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the duplication of the text is not great, since that is bound to get out of sync. Would it be possible to have the text defined in a single file, that then gets used by these two files?

Copy link
Contributor Author

@yvanzo yvanzo Apr 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a known general issue that many things are duplicated between build contexts for production and development versions of MusicBrainz server. This script is the same for both but others have small differences. There is no way to use symbolic links here and having a common build context would be more overhead.

@yvanzo yvanzo merged commit fec044c into master Apr 24, 2023
@yvanzo yvanzo deleted the mbvm-89-info-dl branch April 24, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants